package view;

import javax.swing.*;
import java.awt.*;

public class denglu extends JFrame {
    JFrame jFrame;
    JButton jButton;

    public denglu() {
        jFrame = new JFrame("这是标题");//标题
        jFrame.setSize(600, 400);//大小
        jFrame.setVisible(true);//可以看见
        jFrame.setResizable(false);//不可变大小
        jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);//退出自动关闭
        jFrame.setLocationRelativeTo(null);//居中
        //设置图标
        Image image = new ImageIcon().getImage();
        jFrame.setIconImage(image);
        jButton = new JButton("按钮");
        Container contanPane = getContentPane();
        contanPane.add(jButton);
    }

    public static void main(String[] args) {
        new denglu();
    }
}
